﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Constant;
using Pixysoft.Tools;
using Pixysoft.Weblications.Sango.Environment;
using Pixysoft.Weblications.Sango.Formular;

namespace Pixysoft.Weblications.Sango.Command.player
{
    partial class SangoPlayerHandler
    {
        public player_scoutcooldowninfo player_scoutcooldowninfo()
        {
            string usercode = SangoManager.Authentication();

            player_scoutcooldowninfo response = ReflectionManager.CreatePojo<player_scoutcooldowninfo>();
            response.Succeed = false;

            Entities.Usr_Queue usrQueue = UsrQueueDao.getRunningQueue(usercode, CtiQueueTypecodeCollection.SCOUT, usercode);

            if (usrQueue == null)
            {
                response.Message = "无队列需要冷却";
                return response;
            }

            Entities.Sys_Queue sysQueue = SysQueueHelper.searchByCode(usrQueue.Queueserialcode);
            response.gold = (QueueFormular.getQueueCooldownGoldPrice(usrQueue, sysQueue));
            response.Succeed = true;
            return response;
        }


    }
    public interface player_scoutcooldowninfo : ISangoResponse
    {
        long gold { get;set;}
    }
}
